package no.ntnu.item.ttm4115.termproject.extrasagent;

import java.util.Vector;

import no.ntnu.item.ttm4115.termproject.extrasagent.Player;
import no.tellu.common.javaframe.ActorAddress;

public class Group {
	private ActorAddress actorAddress;
	private Vector<Player> players;
	private String groupName;
	private int id;
	private boolean chat;
	private boolean im;
	private boolean discussion;
	private String groupLeader;

	public Group(ActorAddress actorAddress, Vector<Player> players,
			String groupName, int id,boolean chat,boolean im, boolean discussion,String leader) {
		super();
		this.actorAddress = actorAddress;
		this.players = players;
		this.groupName = groupName;
		this.id = id;
		this.chat = chat;
		this.im = im;
		this.discussion = discussion;
		this.groupLeader = leader;
	}
	
	
	
	public Group() {
		super();
		this.players = new Vector<Player>();
		
	}

	public String getLeader(){
		return groupLeader;
	}
	public void setLeader(String leader){
		this.groupLeader = leader;
	}

	public ActorAddress getActorAddress() {
		return actorAddress;
	}
	public void setActorAddress(ActorAddress actorAddress) {
		this.actorAddress = actorAddress;
	}
	public Vector<Player> getPlayers() {
		return players;
	}
	public void setPlayers(Vector<Player> players) {
		this.players = players;
	}
	public String getGroupName() {
		return groupName;
	}
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}



	public boolean isChat() {
		return chat;
	}



	public void setChat(boolean chat) {
		this.chat = chat;
	}



	public boolean isIm() {
		return im;
	}



	public void setIm(boolean im) {
		this.im = im;
	}



	public boolean isDiscussion() {
		return discussion;
	}



	public void setDiscussion(boolean discussion) {
		this.discussion = discussion;
	}
	public void addPlayer(Player p ){
		if(players.equals(null)){
			players = new Vector<Player>();
			players.add(p);
		}else{
			players.add(p);
		}
	}
}
